<div data-extend-template="layouts/details-page-with-breadcrumbs.html">
  <header data-block="header">
    <h2 translate>Create Content Credential</h2>
  </header>

  <div data-block="content" class="row">
    <form name="contentCredentialForm" class="col-sm-5" novalidate role="form"
          action="{{ uploadURL }}"
          ng-upload="uploadContent(content)"
          upload-options-enable-rails-csrf>

      <div bst-form-group label="{{ 'Name' | translate }}">
        <input id="name"
               name="name"
               ng-model="contentCredential.name"
               type="text"
               tabindex="1"
               autofocus
               required/>
      </div>

      <div bst-form-group label="{{ 'Type' | translate }}">
        <select id="content_type"
                name="content_type"
                required>
          <option value="gpg_key" translate>GPG Key</option>
          <option value="cert" translate>SSL Certificate</option>
        </select>
      </div>

      <div bst-form-group label="{{ 'Content Credential Contents' | translate }}">
        <textarea name="content"
                  ng-model="contentCredential.pastedContent"
                  tabindex="1"
                  class="form-control"
                  style="font-family: monospace"
                  rows="15"
                  placeholder="{{ 'Paste contents of Content Credential' | translate }}">
        </textarea>
      </div>

      <div class="form-group">
        <input type="file" name="file_path"/>
        <p class="help-block" translate>Upload Content Credential file</p>
      </div>

      <div bst-form-buttons upload-submit
           on-cancel="transitionTo('content-credentials')"
           ng-disabled="contentCredential.name == undefined"
           working="progress.uploading">
      </div>
    </form>
  </div>
</div>
